// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'

/******** 全局的样式定义 *********/
import 'font-awesome/css/font-awesome.css';
import '../static/font/pingfangfont.css';
import 'vue2-animate/dist/vue2-animate.css';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/css/global.css'; // 全局样式
import '@/assets/css/dialog.css'; // 特定样式

/********* 框架全局的注入 **********/
import * as util from "@/assets/js/util";
import store from './store/index';
import App from './App';
import router from './router';
import req from '@/assets/js/req';
import storage from '@/store/storage';
import * as constant from "@/store/constant";

/********  第三方组件  ********/
// 转码器，将ES6代码转为ES5代码
import 'babel-polyfill'
// md5加密插件
import md5 from 'js-md5';
Vue.prototype.$md5 = md5;
// 组织树插件
import 'vue2-org-tree/dist/style.css'
import Vue2OrgTree from 'vue2-org-tree'
Vue.use(Vue2OrgTree);
// echart插件
import echarts from 'echarts'

/********  自定义组件  ********/
// 表格内容显示，便于表格扩展
import expand from '@/components/table/expand'
Vue.component('expand', expand)
// 表格分页
//import tablePage from '@/components/table/page'
//Vue.component('tablePage', tablePage)
// 树选择组件
import selectTree from '@/components/elSelect/selectTree'
Vue.component('selectTree', selectTree)

// vue全局配置
Vue.config.productionTip = false;  //阻止启动生产消息，常用作指令。

// vue中添加原型方法
Vue.prototype.$util = util;
Vue.prototype.$storage = storage;
Vue.prototype.$req = req;
Vue.prototype.$operType = constant.operType;
Vue.prototype.$constant = constant;
Vue.prototype.$menuConfig = window.globle.menuConfig;
Vue.prototype.$store = store;
Vue.prototype.$echarts = echarts;

// vue 组件注入
import {
  PageHeader,
  Checkbox,
  CheckboxGroup,
  Cascader,
  Radio,
  RadioGroup,
  RadioButton,
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Row,
  Col,
  Pagination,
  Dialog,
  Button,
  Input,
  Table,
  TableColumn,
  Form,
  FormItem,
  Breadcrumb,
  BreadcrumbItem,
  Autocomplete,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Menu,
  Submenu,
  MenuItem,
  MenuItemGroup,
  MessageBox,
  Message,
  Loading,
  Notification,
  DatePicker,
  TimeSelect,
  TimePicker,
  Tabs,
  Switch,
  Select,
  Option,
  OptionGroup,
  TabPane,
  Tooltip,
  Progress,
  Carousel,
  CarouselItem,
  Upload,
  Popover,
  Tag,
  Tree,
  Image,
  Scrollbar,
  Steps,
  Step,
  Divider,
  Collapse,
  CollapseItem,
  Drawer,
  Calendar,
  Link,
  Badge
} from 'element-ui'
Vue.use(Badge)
Vue.use(Link)
Vue.use(Divider)
Vue.use(CollapseItem)
Vue.use(PageHeader)
Vue.use(Scrollbar)
Vue.use(Checkbox)
Vue.use(Steps)
Vue.use(Step)
Vue.use(CheckboxGroup)
Vue.use(Cascader)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Tag)
Vue.use(Popover)
Vue.use(Container)
Vue.use(Header)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Footer)
Vue.use(Row)
Vue.use(Col)
Vue.use(Pagination)
Vue.use(Dialog)
Vue.use(Button)
Vue.use(Form)
Vue.use(Input)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(FormItem)
Vue.use(Autocomplete)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Loading.directive)
Vue.use(DatePicker)
Vue.use(TimeSelect)
Vue.use(TimePicker)
Vue.use(Tabs)
Vue.use(Switch)
Vue.use(TabPane)
Vue.use(Tooltip)
Vue.use(Progress)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Upload)
Vue.use(Select)
Vue.use(Option)
Vue.use(OptionGroup)
Vue.use(Popover)
Vue.use(Tag)
Vue.use(Tree)
Vue.use(Image)
Vue.use(Collapse)
Vue.use(Drawer)
Vue.use(Calendar)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {
    App
  },
  template: '<App/>'
});


